package cn.kuporo.seckill.order.application.model.command;

import jakarta.validation.constraints.NotNull;
import jakarta.validation.constraints.Positive;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.io.Serializable;

/**
 * @author: kuporo
 * @since: 2025/7/9
 * @description:
 */
@Data
@AllArgsConstructor
@NoArgsConstructor
@Builder
public class SeckillOrderCommand implements Serializable {
    /**
     * 商品id
     */
    @NotNull(message = "商品id不能为空")
    private Long goodsId;

    /**
     * 活动id
     */
    @NotNull(message = "活动id不能为空")
    private Long activityId;

    /**
     * 购买数量
     */
    @NotNull(message = "购买数量不能为空")
    @Positive(message = "购买数量要大于0")
    private Integer quantity;


    /**
     * 商品版本号
     */
    private Long version;

    /**
     * 订单任务id
     */
    private String orderTaskId = "";
}
